package com.cll.learn.cas.demo1;

import java.util.concurrent.atomic.AtomicReference;

/**
 * 描述信息:
 *
 * @author CLL
 * @version 1.0
 * @date 2021/5/15 11:00
 */
public class User {

    /**
     * 当前用户账户余额
     */
    private AtomicReference<Integer> money;

    public User() {
        this.money = new AtomicReference<>();
        this.money.set(19);
    }

    public User(Integer hadMoney) {
        this.money = new AtomicReference<>();
        this.money.set(hadMoney);
    }

    public AtomicReference<Integer> getMoney() {
        return money;
    }

    public void setMoney(AtomicReference<Integer> money) {
        this.money = money;
    }
}
